package com.syc.sqlsession;

import com.syc.entity.Configuration;
import com.syc.entity.MappedStatement;

import java.sql.SQLException;
import java.util.List;

/**
 * 执行器-执行数据库操作
 *
 * @author Shen Yu Chen
 * @create 2020-04-24
 **/
public interface Executor {
    //执行查询:需要配置文件,sql信息,参数
    public <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object... params) throws SQLException, ClassNotFoundException, Exception;

    int update(Configuration configuration, MappedStatement ms, Object...params) throws Exception;
}
